# coding=utf-8
import  pandas as pd 
import  json
file="C:/Users/zhangmb/Desktop/ts-test/test.xlsx"
#df = pd.read_excel(path, sheet_name='Sheet1')
#df.rename(columns = {"Unnamed: 0_level_1" : "序号"}) 


columns=[['id','identity','identity','address'],
         ['id','name','age','city']]

def show_csv():

    with open(file, 'rb') as f:
        df = pd.read_excel(f, header = [0,1])
        df.columns=columns
        row,col = df.shape
    
        #print(df)
        #print(df['identity']['name'].array)
        # row_1 = df.iloc[2, :]  # 读取多级表头的第一行
        # row_1_list=row_1.to_list()
        # print(row_1_list)
        print(df.columns)
        # for row in df.itertuples():
        #     print(row)
        # for i in  range(row)  :
        #     print(df['identity']['name'][i])

if __name__ == '__main__':
    show_csv()




